package cn.kinoko.model.ai.mit.resp;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author kinoko
 * @date 2024/8/13 11:42
 */
@NoArgsConstructor
@Data
public class MITTranslateResp {

    @JsonProperty("details")
    private List<DetailsDTO> details;
    @JsonProperty("img")
    private Object img;

    @NoArgsConstructor
    @Data
    public static class DetailsDTO {
        @JsonProperty("text")
        private TextDTO text;
        @JsonProperty("minX")
        private Integer minX;
        @JsonProperty("minY")
        private Integer minY;
        @JsonProperty("maxX")
        private Integer maxX;
        @JsonProperty("maxY")
        private Integer maxY;
        @JsonProperty("textColor")
        private TextColorDTO textColor;
        @JsonProperty("language")
        private String language;
        @JsonProperty("background")
        private Object background;

        @NoArgsConstructor
        @Data
        public static class TextDTO {
            @JsonProperty("CHS")
            private String chs;
            @JsonProperty("originalText")
            private String originalText;
        }

        @NoArgsConstructor
        @Data
        public static class TextColorDTO {
            @JsonProperty("fg")
            private List<Integer> fg;
            @JsonProperty("bg")
            private List<Integer> bg;
        }
    }
}